#ifndef KERNEL_AGV_I_AGV_COMMAND_H
#define KERNEL_AGV_I_AGV_COMMAND_H

#include "kernel/interfaces/Result.h"
#include <string>
#include <vector>
#include <map>

namespace kernel {
namespace agv {

/**
 * @brief AGV命令接口 - 定义硬件控制契约（由infrastructure层实现）
 * @details 接口只负责发送命令，保持通用性，不包含特定AGV类型的特性
 *          业务逻辑（路径比对、状态检查等）应在application层实现
 */
class IAgvCommand {
public:
    virtual ~IAgvCommand() = default;

    // 导航命令
    virtual Result<void> moveToStationList(int agvNumber, const std::vector<std::string>& stations, const std::string& operation = "") = 0;
    virtual Result<void> moveToStation(int agvNumber, const std::string& sourceId, const std::string& targetId) = 0;
    virtual Result<void> cancelTask(int agvNumber) = 0;
    virtual Result<void> pauseTask(int agvNumber) = 0;
    virtual Result<void> resumeTask(int agvNumber) = 0;

    // 硬件控制命令
    virtual Result<void> controlJack(int agvNumber, bool raise) = 0;
    virtual Result<void> startCharging(int agvNumber, const std::string& chargePoint) = 0;
    virtual Result<void> stopCharging(int agvNumber) = 0;
    virtual Result<void> controlDoor(int agvNumber, int doorId, bool open) = 0;
    virtual Result<void> switchMap(int agvNumber, const std::string& mapName, const std::string& switchPoint) = 0;

    // 查询命令
    virtual Result<void> requestCurrentMap(int agvNumber) = 0;
};

} // namespace agv
} // namespace kernel

#endif // KERNEL_AGV_I_AGV_COMMAND_H
